# Copyright (C) 2005, 2010 International Business Machines and others.
# All Rights Reserved.
# This file is distributed under the Eclipse Public License.

# $Id: Makefile.in 2016 2011-06-15 08:53:32Z stefan $

# Directory to the sources for the (example) problem definition files
SRCDIR = @srcdir@
VPATH = @srcdir@

# Compiler and options
CXX = @CXX@
CXXFLAGS = @CXXFLAGS@

# Archiver for C++ object files (e.g., needed to build a library on AIX to
# avoid multiply defined symbols for templates)
CXXAR = @CXXAR@

# additional C++ Compiler options for linking
CXXLINKFLAGS = @RPATH_FLAGS@

# Include directories (we use the CYGPATH_W variables to allow compilation with Windows compilers)
@COIN_HAS_PKGCONFIG_TRUE@INCL = `PKG_CONFIG_PATH=@COIN_PKG_CONFIG_PATH@ @PKG_CONFIG@ --cflags ipopt` $(ADDINCFLAGS) -I. -DHAVE_CONFIG_H
@COIN_HAS_PKGCONFIG_FALSE@INCL = -I`$(CYGPATH_W) @abs_include_dir@/coin` @IPOPTLIB_CFLAGS_INSTALLED@ $(ADDINCFLAGS) -I. -DHAVE_CONFIG_H

LIB = libscalexamples.@LIBEXT@

# Linker flags
@COIN_HAS_PKGCONFIG_TRUE@LIBS = $(LIB) `PKG_CONFIG_PATH=@COIN_PKG_CONFIG_PATH@ @PKG_CONFIG@ --libs ipopt`
@COIN_HAS_PKGCONFIG_FALSE@@COIN_CXX_IS_CL_TRUE@LIBS = $(LIB) -link -libpath:`$(CYGPATH_W) @abs_lib_dir@` libipopt.lib @IPOPTLIB_LIBS_INSTALLED@
@COIN_HAS_PKGCONFIG_FALSE@@COIN_CXX_IS_CL_FALSE@LIBS = $(LIB) -L@abs_lib_dir@ -lipopt @IPOPTLIB_LIBS_INSTALLED@

# Name of the executable
EXE = solve_problem@EXEEXT@

# List of all object files
MAINOBJ =  solve_problem.@OBJEXT@

# List of all object files
LIBOBJS =  \
	MittelmannDistCntrlNeumA.@OBJEXT@ \
        MittelmannDistCntrlNeumB.@OBJEXT@ \
        MittelmannDistCntrlDiri.@OBJEXT@ \
        MittelmannBndryCntrlDiri.@OBJEXT@ \
        MittelmannBndryCntrlDiri3D.@OBJEXT@ \
        MittelmannBndryCntrlDiri3D_27.@OBJEXT@ \
        MittelmannBndryCntrlDiri3Dsin.@OBJEXT@ \
        MittelmannBndryCntrlNeum.@OBJEXT@ \
        LuksanVlcek1.@OBJEXT@ \
        LuksanVlcek2.@OBJEXT@ \
        LuksanVlcek3.@OBJEXT@ \
        LuksanVlcek4.@OBJEXT@ \
        LuksanVlcek5.@OBJEXT@ \
        LuksanVlcek6.@OBJEXT@ \
        LuksanVlcek7.@OBJEXT@ \
        RegisteredTNLP.@OBJEXT@

all: $(EXE)

# Dependencies
LuksanVlcek1.@OBJEXT@ : LuksanVlcek1.hpp
LuksanVlcek2.@OBJEXT@ : LuksanVlcek2.hpp
LuksanVlcek3.@OBJEXT@ : LuksanVlcek3.hpp
LuksanVlcek4.@OBJEXT@ : LuksanVlcek4.hpp
LuksanVlcek5.@OBJEXT@ : LuksanVlcek5.hpp
LuksanVlcek6.@OBJEXT@ : LuksanVlcek6.hpp
LuksanVlcek7.@OBJEXT@ : LuksanVlcek7.hpp
MittelmannDistCntrlNeumA.@OBJEXT@: MittelmannDistCntrlNeumA.hpp
MittelmannDistCntrlNeumB.@OBJEXT@: MittelmannDistCntrlNeumB.hpp
MittelmannDistCntrlDiri.@OBJEXT@: MittelmannDistCntrlDiri.hpp
MittelmannBndryCntrlDiri.@OBJEXT@: MittelmannBndryCntrlDiri.hpp
MittelmannBndryCntrlDiri3D.@OBJEXT@: MittelmannBndryCntrlDiri3D.hpp
MittelmannBndryCntrlDiri3D_27.@OBJEXT@: MittelmannBndryCntrlDiri3D_27.hpp
MittelmannBndryCntrlDiri3Dsin.@OBJEXT@: MittelmannBndryCntrlDiri3Dsin.hpp
MittelmannBndryCntrlNeum.@OBJEXT@: MittelmannBndryCntrlNeum.hpp

solve_problem.@OBJEXT@: \
	LuksanVlcek1.hpp \
	LuksanVlcek2.hpp \
	LuksanVlcek3.hpp \
	LuksanVlcek4.hpp \
	LuksanVlcek5.hpp \
	LuksanVlcek6.hpp \
	LuksanVlcek7.hpp \
	MittelmannDistCntrlNeumA.hpp \
	MittelmannDistCntrlNeumB.hpp \
	MittelmannDistCntrlDiri.hpp \
	MittelmannBndryCntrlDiri.hpp \
	MittelmannBndryCntrlDiri3D.hpp \
	MittelmannBndryCntrlDiri3D_27.hpp \
	MittelmannBndryCntrlDiri3Dsin.hpp \
	MittelmannBndryCntrlNeum.hpp \
	MittelmannParaCntrl.hpp

# The following is necessary under cygwin, if native compilers are used
CYGPATH_W = @CYGPATH_W@

.SUFFIXES: .cpp .c .o .obj

$(EXE): $(MAINOBJ) $(LIB)
	$(CXX) $(CXXFLAGS) $(CXXLINKFLAGS) -o $@ $(MAINOBJ) $(LIBS)

$(LIB): $(LIBOBJS)
	$(CXXAR) $(LIB) $(LIBOBJS)

clean:
	rm -rf $(EXE) $(MAINOBJ) $(LIBOBJS) $(LIB)

.cpp.o:
	$(CXX) $(CXXFLAGS) $(INCL) -c -o $@ `test -f '$<' || echo '$(SRCDIR)/'`$<


.cpp.obj:
	$(CXX) $(CXXFLAGS) $(INCL) -c -o $@ `if test -f '$<'; then $(CYGPATH_W) '$<'; else $(CYGPATH_W) '$(SRCDIR)/$<'; fi`
